package com.konsung.ksdc.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/5/16 0016.
 * 地址最终bean类
 */
public class AddrUltimateBean implements Parcelable {
    private ArrayList<AddrAdvanceBean> aearList; //地区集合
    private String areaId; //地区id
    private String areaName; //地区名称

    /**
     * @return 地区集合
     */
    public ArrayList<AddrAdvanceBean> getAearList() {
        return aearList;
    }

    /**
     * @param aearList 集合
     */
    public void setAearList(ArrayList<AddrAdvanceBean> aearList) {
        this.aearList = aearList;
    }

    /**
     * @return 地区id
     */
    public String getAreaId() {
        return areaId;
    }

    /**
     * 设置id
     * @param areaId 地区id
     */
    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    /**
     * 获取地区名称
     * @return 地区名称
     */
    public String getAreaName() {
        return areaName;
    }

    /**
     * 设置地区名称
     * @param areaName 地区名称
     */
    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(aearList);
        dest.writeString(this.areaId);
        dest.writeString(this.areaName);
    }

    /**
     * 构造
     */
    public AddrUltimateBean() {
    }

    /**
     * 序列化构造
     * @param in 序列化
     */
    protected AddrUltimateBean(Parcel in) {
        this.aearList = in.createTypedArrayList(AddrAdvanceBean.CREATOR);
        this.areaId = in.readString();
        this.areaName = in.readString();
    }

    public static final Parcelable.Creator<AddrUltimateBean> CREATOR = new
            Parcelable.Creator<AddrUltimateBean>() {
                @Override
                public AddrUltimateBean createFromParcel(Parcel source) {
                    return new AddrUltimateBean(source);
                }

                @Override
                public AddrUltimateBean[] newArray(int size) {
                    return new AddrUltimateBean[size];
                }
            };
}
